

<div class="no-data" *ngIf="imageList.length === 0" [ngStyle]="{height: mainImageHeight, width: mainImageWidth}">
    <img [src]="noDataIcon" />
    <span>暂无数据</span>
</div>
<div class="image-container" *ngIf="imageList.length !== 0" [ngStyle]="{height: mainImageHeight, width: mainImageWidth}" >
    <img class="switch-btn prev-btn"
         *ngIf="imageList[currentImageIndex]"
         [src]="btnIcon[0]"
         [title]="currentImageIndex === 0 ? '已经是第一张了' : '上一个'"
         [ngStyle]="{'cursor': currentImageIndex === 0 ? 'not-allowed' : 'pointer'}"
         (click)="switchImage(currentImageIndex - 1)"
    />
    <img class="main-image" *ngIf="imageList[currentImageIndex]" [src]="imageList[currentImageIndex].url" (click)="clickShowImg()" />
    <!--    <sa-image-preview [src]="imageList[currentImageIndex]" [imageList]="imageList"></sa-image-preview>-->
    <img class="switch-btn"
         *ngIf="imageList[currentImageIndex]"
         [src]="btnIcon[1]"
         [title]="currentImageIndex === imageList.length - 1 ? '已经是最后一张了' : '下一个'"
         [ngStyle]="{'cursor': currentImageIndex === imageList.length - 1 ? 'not-allowed' : 'pointer'}"
         (click)="switchImage(currentImageIndex + 1)"
    />
</div>
<div class="image-list-container" *ngIf="imageList.length !== 0">
    <div class="image-list" [ngStyle]="currentImageListStyle">
        <div [ngClass]="{'image-list_item_div': true, 'active_item': currentImageIndex === i}"
             *ngFor="let item of imageList, let i = index"
             (click)="switchImage(i)"
        >
            <img class="image-list_item_image" [src]="item.url"/>
        </div>
    </div>
</div>